<div class="row" style="height:100%;">
	<div class="col-lg-12" style="border-right:1px solid #e6e6e6;padding-right:0px;">
		<h1 class="site-h1" style="background-color:#FFFFFF;">
			SIP网关<#if sipTrunkListList??>（${sipTrunkListList?size}）</#if>
			<span style="float:right;">
				<button class="layui-btn layui-btn-sm green" href="/admin/callcenter/siptrunk/add.html?hostid=${pbxHost.id!''}" data-toggle="ajax" data-width="850" data-height="650"  data-title="添加SIP网关">
					添加SIP网关
				</button>
			</span>
		</h1>
		<div class="row">
			<div class="col-lg-12">
				<div class="row" style="padding:5px;">
					<div class="col-lg-12">
						<table class="layui-table" lay-skin="line">
						  <colgroup>
								<col width="10%">
								<col width="10%">
								<col width="10%">
								<col width="10%">
								<col width="10%">
								<col width="20%">
								<col width="10%">
								<col width="10%">
							  	<col width="9%">
								<col width="1%">
								<col>
						  </colgroup>
						  <thead>
							<tr>
							  <th>名称</th>
							  <th>服务器</th>
							  <th>通话</th>
							  <th>心跳</th>
							  <th>注册</th>
							  <th>创建时间</th>
							  <th>本地网关</th>
							  <th>默认网关</th>
						      <th>域名</th>
							  <th style="white-space:nowrap;" nowrap="nowrap">操作</th>
							</tr> 
						  </thead>
						  <tbody>
							<#if sipTrunkListList??>
							<#list sipTrunkListList as siptrunk>
							<tr>
								<td>
									<a href="/admin/callcenter/siptrunk/code.html?hostid=${pbxHost.id!''}&id=${siptrunk.id!''}" data-toggle="ajax" data-width="650" data-height="350">${siptrunk.name!''}</a>
								 </td>
								<td>${siptrunk.sipserver!''}:${siptrunk.port!''}</td>
								<td>${siptrunk.totalcount!''}</td>
								<td>${siptrunk.heartbeat!''}</td>
							  
								<td>
									<#if siptrunk.register>
										<i class="layui-icon" style="color:#19a55d;">&#xe605;</i>
									</#if>
								</td>
								  
								<td>${siptrunk.createtime?string("yyyy-MM-dd HH:mm:ss")}</td>
								<td>
									<#if siptrunk.localreg?? && siptrunk.localreg == true>
										<i class="layui-icon" style="color:#19a55d;">&#xe605;</i>
									</#if>
								</td>
								<td>
									<#if siptrunk.defaultsip?? && siptrunk.defaultsip == true>
										<i class="layui-icon" style="color:#19a55d;">&#xe605;</i>
									</#if>
								</td>
								<td>${siptrunk.title!''}</td>
								<td style="white-space:nowrap;" nowrap="nowrap">
								  		<a href="/admin/callcenter/siptrunk/edit.html?id=${siptrunk.id!''}&hostid=${pbxHost.id!''}" data-toggle="ajax" data-width="850" data-height="650" data-title="编辑SIP网关信息">
								  			<i class="layui-icon">&#xe642;</i>
								  			编辑
								  		</a>
								  		<a href="/admin/callcenter/siptrunk/editsenior.html?id=${siptrunk.id!''}&hostid=${pbxHost.id!''}" data-toggle="ajax" style="margin-left:10px;" data-width="850" data-height="650" data-title="配置SIP网关附加信息">
								  			<i class="layui-icon">&#xe631;</i>
								  			配置
								  		</a>
								  		<#if siptrunk.dynamic?? && siptrunk.dynamic>
									  		<a href="/admin/callcenter/siptrunk/dynamic.html?id=${siptrunk.id!''}&hostid=${pbxHost.id!''}" data-toggle="ajax" style="margin-left:10px;" data-width="850" data-height="650" data-title="配置SIP网关动态路由">
									  			<i class="layui-icon">&#xe628;</i>
									  			动态路由
									  		</a>
								  		</#if>
								  		<a href="/admin/callcenter/siptrunk/delete.html?id=${siptrunk.id!''}&hostid=${pbxHost.id!''}" data-callback="loadURL" style="margin-left:10px;" data-toggle="tip" data-target="#callCenterContent" data-title="请确认是否删除SIP网关？">
								  			<i class="layui-icon" style="color:red;">&#x1006;</i>
								  			删除
								  		</a>
								 </td>
							</tr>
							</#list>
							</#if>
						  </tbody>
						</table>
					</div> 	   
				</div>
			</div>	
		</div>
	</div>	
</div>
<script>
	layui.use('layer', function(){
	  var layer = layui.layer;
	  <#if msg?? && msg == 'update_failure'>
		layer.alert('SIP网关名称不可重复！', {icon: 2});
	  <#elseif msg?? && msg == 'update_success'>
		layer.alert('保存成功！', {icon: 1});
	  </#if>
	});  
	
</script>